package com.xbongbong.pro.form.pojo.dto;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 联系人查重入参
 *
 * @author feng.zheng
 * @version v1.0
 * @date 2019/1/28 17:12
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class ContactDataRepeatDTO extends BaseDTO {
    private static final long serialVersionUID = -2911228313118037895L;

    /**
     * 应用ID
     */
    @NotNull(message = "{dto.msg.contactDataRepeat.appId.NotNull}")
    private Long appId;

    /**
     * 菜单id
     */
    @NotNull(message = "{dto.msg.contactDataRepeat.menuId.NotNull}")
    private Long menuId;

    /**
     * 字段标识
     */
    @NotBlank(message = "{dto.msg.contactDataRepeat.attr.NotBlank}")
    @Getter(onMethod_ = {@QueryIgnore})
    private String attr;

    /**
     * 子表单内字段标识
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private String subAttr;
    /**
     * 联系人ID
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Long contactId;
    /**
     * 客户ID
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Long customerId;
    /**
     * 判重规则
     */
    @Getter(onMethod_ = {@QueryIgnore})
    @NotNull
    private Integer phoneRepeatRule;
    /**
     * 电话号码
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private String tel;
    /**
     * 删除标记
     */
    private Integer del;

    /**
     * 联系人电话集合
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private List<String> contactPhoneList;

    public ContactDataRepeatDTO() {
        this.del = DelEnum.NORMAL.getDel();
    }

}
